<extend name="Public/baseConf"/>
<block name="breadcrumb"> 
	<div class="row wrapper border-bottom white-bg page-heading">
	    <div class="col-lg-4">
	        <h2>行为日志</h2>
	        <ol class="breadcrumb">
	            <li><a href="{:U('index/index')}">首页</a></li>
	            <li><a href="{:U('Action/actionlog')}">行为日志</a></li>
	            <li class="active">
	                <strong>查看</strong>
	            </li>
	        </ol>
	    </div>
	    <div class="col-lg-8">
            <div class="title-action">
				<span class="block pull-right">
					<a class="btn btn-warning" type="submit" href="{:U('actionlog')}"><i class="fa fa-reply"></i>返回</a>
				</span>
            </div>
        </div>
	</div>
</block>
<block name="body"> 
	<div class="row">
	    <div class="col-lg-12">
	        <div class="ibox float-e-margins">
	            <div class="ibox-title">
	                <h5>行为详情<small></small></h5>
	                <div class="ibox-tools">
	                    <a class="collapse-link">
	                        <i class="fa fa-chevron-up"></i>
	                    </a>
	                </div>
	            </div>
	            <div class="ibox-content">
	                <form id="form" method="post" class="form-horizontal doc-modal-form"> 
	                    <div class="form-group"><label class="col-sm-2 control-label">行为名称</label>
	                        <div class="col-sm-10">
	                        <span>{:get_action($info['action_id'], "title")}</span>
	                        </div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-2 control-label">执行者</label>
	                        <div class="col-sm-10">
	                        <span>{:get_nickname($info['user_id'])}</span>
	                        </div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-2 control-label">执行IP</label>
	                        <div class="col-sm-10">
	                        <span>{:long2ip($info['action_ip'])}</span>
	                        </div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-2 control-label">执行时间</label>
	                        <div class="col-sm-10">
	                        <span>{:date('Y-m-d H:i:s',$info['create_time'])}</span>
	                        </div>
	                    </div>
	                    <div class="hr-line-dashed"></div>
	                    <div class="form-group"><label class="col-sm-2 control-label">备注</label>
	                        <div class="col-sm-10">
								<span>{$info.remark}</span>
	                        </div>
	                    </div>

	                </form>
	            </div>
	        </div>
	    </div>
	</div> 

</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/jquery.dragsort-0.5.1.min.js"></script>
<script type="text/javascript" charset="utf-8">
Think.setValue("extend", {$info.extend|default=0}); 
//拖曳插件初始化
$(function(){
	$(".dragsort").dragsort({
	     dragSelector:'li',
	     placeHolderTemplate: '<li class="draging-place">&nbsp;</li>',
	     dragBetween:true,	//允许拖动到任意地方
	     dragEnd:function(){
	    	 var self = $(this);
	    	 self.find('input').attr('name', 'field_sort[' + self.closest('ul').data('group') + '][]');
	     	//updateVal();
	     }
	 });

	$('#sortUl li b').click(function(){
		$(this).parent().remove();
		updateVal();
	});

	// 更新排序后的隐藏域的值
	function updateVal() {
		var fields = new Array();
		$('.form_field_sort').each(function(){
			var i = 1;
			var self = this;
			var group = $(self).attr('group');
			$(self).find('li').each(function(){
		   		var id = $(this).find('em').attr('data');
		   		$('#field-' + id).val(id + ':' + group + ':' + i++);
		   	});
		});

	}
})
</script>
</block>

